package com.syg.consumer;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * @author ps
 */
@Component
public class ConsumerListener {

    /**
     * 监听kafka数据
     */
    @KafkaListener(topics = {"big_data_topic"})
    public void consumer(ConsumerRecord<?, ?> consumerRecord) {
        System.out.println("收到kafka的数据=" + consumerRecord);
    }
}
